import hyRequest from '@/service'

// 获取下拉框格式的角色数据
export const getSelectRoleList = () => {
  return hyRequest.get({
    url: `/role/selectRoleFormatList`
  })
}

// 获取权限树数据：给角色分配权限的时候用到
export const getAssignTreeList = (params: any) => {
  return hyRequest.get({
    url: `/role/getAssignTree`,
    params
  })
}

// 分配权限
export const reqAssignPermission = (data: any) => {
  return hyRequest.post({
    url: `/role/saveAssign`,
    data,
    isShowMessage: true
  })
}
